package com.hjq.fcloud.http.api;

import com.hjq.fcloud.model.HrefModel;
import com.hjq.http.config.IRequestApi;

import java.util.List;

public final class GetListJsonApi implements IRequestApi {
    @Override
    public String getApi() {
        return "/searchtree/get_list_json.php";
    }

    private String menu_id;
    private String fnc_id;

    public GetListJsonApi setFnc_id(String fnc_id) {
        this.fnc_id = fnc_id;
        return this;
    }

    public GetListJsonApi setMenu_id(String menu_id) {
        this.menu_id = menu_id;
        return this;
    }

    public static class DataDTO {
        private InfoDTO info;
        private List<JsonDTO> json;

        public InfoDTO getInfo() {
            return info;
        }

        public void setInfo(InfoDTO info) {
            this.info = info;
        }

        public List<JsonDTO> getJson() {
            return json;
        }

        public void setJson(List<JsonDTO> json) {
            this.json = json;
        }

        public static class InfoDTO {
            private String title;
            private String type;
            private String href;
            private String detail;//如果detail不为空可以进入详情
            private String btnName;

            public String getBtnName() {
                return btnName;
            }

            public void setBtnName(String btnName) {
                this.btnName = btnName;
            }

            public String getDetail() {
                return detail == null ? "" : detail;
            }

            public void setDetail(String detail) {
                this.detail = detail;
            }

            public String getHref() {
                return href;
            }

            public void setHref(String href) {
                this.href = href;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }
        }

        public static class JsonDTO {
            private String dataIndex;
            private String title;
            private int hideInSearch;//0-》是展示在搜索栏，1-》隐藏在搜索栏   (注意如果hideInSearch==1则：①不作为条件展示，②并且再搜索界面不能重置这个条件)
            private int hideInTable;
            private String valueType;
            private String selectCode;
            private HrefModel href;
            private String tree_limit_info;
            /**
             * [{
             * "value": "未开始",
             * "color": "#1890ff"
             * },
             * {
             * "value": "已接收",
             * "color": "#00df59"
             * },
             * {
             * "value": "进行中",
             * "color": "#00df59"
             * },
             * {
             * "value": "已完成",
             * "color": "#36AA6D"
             * }
             *
             * ]
             */
            private String colorList;

            public String getColorList() {
                return colorList;
            }

            public void setColorList(String colorList) {
                this.colorList = colorList;
            }

            public String getTree_limit_info() {
                return tree_limit_info;
            }

            public void setTree_limit_info(String tree_limit_info) {
                this.tree_limit_info = tree_limit_info;
            }

            public String getDataIndex() {
                return dataIndex;
            }

            public void setDataIndex(String dataIndex) {
                this.dataIndex = dataIndex;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public int getHideInSearch() {
                return hideInSearch;
            }

            public void setHideInSearch(int hideInSearch) {
                this.hideInSearch = hideInSearch;
            }

            public int getHideInTable() {
                return hideInTable;
            }

            public void setHideInTable(int hideInTable) {
                this.hideInTable = hideInTable;
            }

            public String getValueType() {
                return valueType;
            }

            public void setValueType(String valueType) {
                this.valueType = valueType;
            }

            public String getSelectCode() {
                return selectCode;
            }

            public void setSelectCode(String selectCode) {
                this.selectCode = selectCode;
            }

            public HrefModel getHref() {
                return href;
            }

            public void setHref(HrefModel href) {
                this.href = href;
            }

        }
    }
}